<% Head() dim admin_flag admin_flag=",4," If Not Dvbbs.master or instr(","&session("flag")&",",admin_flag)=0 Then Errmsg=ErrMsg + "
  • 本页面为管理员专用,请登录后进入。
  • 您没有管理本页面的权限。" dvbbs_error() Else select case request("action") case "save1" save1() case "save2" save2() case "save3" save3() case "search" search() case "view" view() case "edit" edit() case "del" del() case else consted() end select If founderr then call dvbbs_error() footer() End If sub consted() dim sel %>
    论坛帮助管理 | 预览帮助
    输入帮助关键字

    输入帮助关键字进行搜索,不输入查询条件为显示所有帮助

    <% search() %>
    论坛帮助添加
  • 所添加内容将自动显示于前台的帮助页面;
  • 添加一级分类方法:选取下拉选项“作为一级分类”,并填写旁边分类标题,标题与内容可以不填写;
  • 所有填写内容均可使用HTML语法填写!
  • 标题:
    分类:  
    类型: 选择此项所添加内容将不显示在帮助文件首页中
    内容:
     
    <% end sub sub save1() dim title,content,parentid,stype if Request.form("classid")="0" then if request("classtitle")="" then Errmsg="如果您选择添加一级分类,请填写选择下拉框的左边输入框" founderr=true exit sub else title=request("classtitle") end if ParentID=0 else if request("title")="" then Errmsg="请填写帮助标题" founderr=true exit sub else title=request("title") end if ParentID=Request.form("classid") end if if request("stype")="1" then stype=1 else stype=0 end if set rs=server.createobject("adodb.recordset") sql="select * from dv_help" rs.open sql,conn,1,3 rs.addnew rs("h_parentid")=parentid rs("h_title")=FilterJS(title) rs("h_content")=replace(FilterJS(request.form("content")),chr(10),"
    ") rs("h_bgimg")=FilterJS(request.form("targeturl")) rs("h_type")=0 rs("h_stype")=stype rs.update rs.close set rs=nothing dv_suc("保存前台帮助成功!") end sub sub save3() dim title,content,parentid,stype if request("classid")="0" then if request("classtitle")="" then Errmsg="如果您选择添加一级分类,请填写选择下拉框的左边输入框" founderr=true exit sub else title=request("classtitle") end if ParentID=0 else if request("title")="" then Errmsg="请填写帮助标题" founderr=true exit sub else title=request("title") end if ParentID=request("classid") end if if request("stype")="1" then stype=1 else stype=0 end if set rs=server.createobject("adodb.recordset") sql="select * from dv_help where h_id="&request("id") rs.open sql,conn,1,3 if not rs.eof then rs("h_parentid")=parentid rs("h_title")=FilterJS(title) rs("h_content")=replace(FilterJS(request("content")),chr(10),"
    ") rs("h_bgimg")=FilterJS(request("targeturl")) rs("h_type")=request("ctype") rs("h_stype")=stype end if rs.update rs.close set rs=nothing dv_suc("保存后台帮助成功!") end sub Function FilterJS(v) If not isnull(v) then dim t dim re dim reContent Set re=new RegExp re.IgnoreCase =true re.Global=True re.Pattern="(javascript)" t=re.Replace(v,"javascript") re.Pattern="(jscript:)" t=re.Replace(t,"jscript:") re.Pattern="(js:)" t=re.Replace(t,"js:") re.Pattern="(value)" t=re.Replace(t,"value") re.Pattern="(about:)" t=re.Replace(t,"about:") re.Pattern="(file:)" t=re.Replace(t,"file:") re.Pattern="(document.cookie)" t=re.Replace(t,"documents.cookie") re.Pattern="(vbscript:)" t=re.Replace(t,"vbscript:") re.Pattern="(vbs:)" t=re.Replace(t,"vbs:") re.Pattern="(on(mouse|exit|error|click|key))" t=re.Replace(t,"on$2") re.Pattern="(&#)" t=re.Replace(t,"&#") FilterJS=t set re=nothing End if End Function function search() %> <% dim keyword,currentpage,page_count,totalrec set rs=server.createobject("adodb.recordset") if request("stype")<>"" then sql=" h_type="&request("stype") end if if request("keyword")<>"" then if sql<>"" then sql=sql & " and h_title like '%"&replace(request("keyword"),"'","")&"%' or h_content like '%"&replace(request("keyword"),"'","")&"%'" else sql=" h_title like '%"&replace(request("keyword"),"'","")&"%' or h_content like '%"&replace(request("keyword"),"'","")&"%'" end if end if if sql="" then sql="select * from dv_help where not h_id=1 order by h_id desc" else sql="select * from dv_help where "&sql&" and not h_id=1 order by h_id desc" end if rs.open sql,conn,1,1 currentPage=request("page") if currentpage="" or not IsNumeric(currentpage) then currentpage=1 else currentpage=clng(currentpage) end if if not rs.eof then rs.PageSize = 10 rs.AbsolutePage=currentpage page_count=0 totalrec=rs.recordcount while (not rs.eof) and (not page_count = rs.PageSize) %> <% page_count = page_count + 1 rs.movenext wend else %> <% end if rs.close set rs=nothing dim pcount,endpage if totalrec mod 10=0 then Pcount= totalrec \ 10 else Pcount= totalrec \ 10+1 end if response.write "" %>
    论坛帮助和后台菜单管理列表
    <% Response.Write rs("h_title") %> [查看内容] [编辑] [删除]
    <% if not isnull(rs("h_content")) and rs("h_content")<>"" then Response.Write left(replace(replace(rs("h_content"),"
    "," "),"
    "," "),100) else if rs("H_ParentID")=0 then Response.Write "此项为一级分类标题!" Else Response.Write "本条帮助没有录入内容!" End If end if %>
    没有找到任何帮助
    " response.write "" response.write "
    页次:"¤tpage&"/"&Pcount&"页" response.write " 每页10 总数"&totalrec&"分页:" if currentpage > 4 then response.write "[1] ..." end if if Pcount>currentpage+3 then endpage=currentpage+3 else endpage=Pcount end if for i=currentpage-3 to endpage if not i<1 then if i = clng(currentpage) then response.write " ["&i&"]" else response.write " ["&i&"]" end if end if next if currentpage+3 < Pcount then response.write "... ["&Pcount&"]" end if response.write "
    <% end function function view() %>
    查看论坛帮助
    <% set rs=Dvbbs.Execute("select * from dv_help where h_id="&request("id")) if rs.eof and rs.bof then Response.Write "没有找到帮助" else Response.Write "
    "&rs("h_title")&"



    " Response.Write "
    "&rs("h_content")&"
    " Response.Write "" end if %>
    <% end function function edit() %>
    论坛帮助编辑
    <% dim trs set rs=Dvbbs.Execute("select * from dv_help where h_id="&request("id")) if rs.eof and rs.bof then Response.Write "没有找到帮助" else %>
    " name="id">
    标题:">  
    分类:  ">
    类型:> 选择此项所添加内容将不显示在左边菜单中(后台有效)
    背景:"> 填写路径
    内容:
     
    <% end if %>
    <% end function function del() Dvbbs.Execute("delete from dv_help where (not h_id=1) and h_id="&Request("id")) dv_suc("删除论坛帮助成功!") end function %>